package cn.pzhu.java.ch02.statements;

public class ForDemo {

	public static void main(String[] args) {
		/*for(int i=0;i<10;i++){
			//System.out.println("For "+i++);
			System.out.println("For "+(++i));
		}*/
		
		/*for(int i=init();test(i);i=iterate(i)){
			System.out.println("For "+i);
		}*/
		
		/*for(int i=init();test(i);){
			System.out.println("For "+i++);
		}*/
		/*for(int i=init();;){
			System.out.println("For "+i++);
		}*/
		for(;;){
			System.out.println("For ");
		}


	}

	static int init() {
		System.out.println("init");
		return 0;
	}

	static boolean test(int i) {
		System.out.println("test i" + i);
		return i < 10;
	}

	static int iterate(int i) {
		System.out.println("iterate i" + i);
		return ++i;
	}

}
